<template>
    <el-pagination  class="container"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
       :current-page="page"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
</template>

<script>
export default {
    props:{
        page:{
          defualt(){return 1},
          type:Number
        },
        pageSize:{
          defualt(){return 20},
          type:Number
        },
        pageSizes:{
          defualt(){return [20,40,60,80,100]  },
          type:Array
        },
        total:{
          defualt(){return 1},
          type:Number
        },
    },
 methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        this.$emit('changepageSize',val)

      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        this.$emit('changePage',val)

      }
    },
    data() {
      return {
        // currentPage1: 5,
     
      };
    }
}
</script>

<style lang="less" scoped>
 .container {
    height:60px;
    display: flex;
    align-items: center;
    justify-content: right;
 }

</style>

